from public.action import *
from public.business import *
from public.testData import *
from public.tools import *

testCase = "DBshop028_删除标签组信息"
#打开网页，登录后台
firefox=openBrowser(urlAdmin)
DBshopLoginAdmin(firefox)
# 点击商品管理商品标签商品标签分组
DBshopEnterMenu3(firefox,"商品管理","商品标签","商品标签分组")
# 点击删除
firefox.find_element_by_link_text("删除").click()
time.sleep(1)
firefox.switch_to.alert.accept()
time.sleep(2)
#断言
if firefox.find_element_by_xpath('//*/table/tbody/tr[1]/td[2]').is_displayed():
    writeLog("%s 测试通过" % (testCase))
else:
    writeLog("%s 测试失败" % (testCase))
    getPhoto(firefox)
firefox.quit()